package baseTest;

import java.util.HashMap;
import java.util.Scanner;

public class chess {
    public static void main(String[] args) {
        Scanner scanner =new Scanner(System.in);
        int c = scanner.nextInt();
        int d = scanner.nextInt();
        int a = scanner.nextInt();
        int b = scanner.nextInt();
         HashMap<Integer, Integer> hashMap = new HashMap<Integer, Integer>();
        HashMap<Integer, Integer> hashMap1 = new HashMap<Integer, Integer>();
        hashMap.put(a,b);
         if (b>2) {
             hashMap.put(a + 1,b - 2);
             if (a>1)
             hashMap.put(a - 1,b - 2);
         }
         if (b>1){
             hashMap.put(a+2,b-1);
             if (a>2)
                 hashMap.put(a - 2, b - 1);
         }

        if (a>2){
            hashMap1.put(a-2,b+1);
        }
        if (a>1){
            hashMap1.put(a-1,b+2);
        }
        hashMap1.put(a+2,b+1);
        hashMap1.put(a+1,b+2);
        System.out.println(process(c,d,hashMap,hashMap1,0,0));
    }
    public static int process(int c,int d,HashMap hashMap,HashMap hashMap1,int row, int column){
        if (row > c || column >d){
            return 0;
        }
        if (hashMap.containsKey(row)){
           if ((int)hashMap.get(row) == column){
              return 0;
           }
        }
        if (hashMap1.containsKey(row)){
            if ((int)hashMap1.get(row) == column){
                return 0;
            }
        }
        if (row == c && column == d){
            return 1;
        }
        return process(c,d,hashMap,hashMap1,row+1,column)+process(c, d, hashMap, hashMap1,row, column+1);
    }

}
